package com.example.littleSpider.myapplication.activity;

import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.example.littleSpider.myapplication.R;
import com.example.littleSpider.myapplication.adapter.MyIncomeAdapter;
import com.example.littleSpider.myapplication.base.BaseActivity;
import com.example.littleSpider.myapplication.myInterfaces.MethodInTitle;
import com.example.littleSpider.myapplication.view.TitleView;
import com.littlespider.mylibrary.util.T;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;

/**
 * Created by EDZ on 2017/12/14.
 * 赶快个人中心 我的收入界面
 */

public class MyIncomeActivity extends BaseActivity implements MethodInTitle{

    @BindView(R.id.recycle_myincome)
    RecyclerView recycle_myincome;

    @BindView(R.id.title_view)
    TitleView mTitleView;
    @Override
    protected int getLayoutRes() {
        return R.layout.activity_myincome;
    }

    @Override
    protected void initView() {
        mTitleView.initMyTitle("赶快-我的收入", this);
        mTitleView.showRightTwo(false);
        mTitleView.hideTitleTextImage();

        List<String> datas = new ArrayList<>();
        for (int i = 0; i < 20; i++) {
            datas.add("");
        }
        recycle_myincome.setLayoutManager(new LinearLayoutManager(this));
        MyIncomeAdapter adapter = new MyIncomeAdapter(R.layout.itme_myincome,datas);
        recycle_myincome.setAdapter(adapter);

        //条目点击事件点击跳转相应订单详情页
        adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
            @Override
            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
                T.show(MyIncomeActivity.this, "position:" + position);
            }
        });
    }

    @Override
    protected void initData() {

    }

    @Override
    public void setGoBack() {
        finish();
    }

    @Override
    public void onRightOne() {

    }

    @Override
    public void onRightTwo() {

    }

    @Override
    public void onTitleText() {

    }
}
